package com.scau.dao.Impl;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import com.scau.dao.VideoDao;
import com.scau.mapper.VideoMapper;
import com.scau.pojo.Video;
import com.scau.util.SqlSessionFactoryUtil;
@Repository
public class VideoDaoImpl implements VideoDao{
	
	SqlSession session = SqlSessionFactoryUtil.getSession();
	VideoMapper videoMapper=session.getMapper(VideoMapper.class);
	
	@Override
	public List<Video> query(int id) {
		return videoMapper.selectBySectionId(id);
	}

	@Override
	public int countBySeId(int id) {
		return videoMapper.countByExample(id);
	}


	public int add(Video video) {
		// TODO Auto-generated method stub
		return 0;
	}

	public int update(Video video) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int delete(int id) {
		// TODO Auto-generated method stub
		return 0;
	}
}
